
const state = ({ 
  globalFocusFlag: false,
  ifreamShow:false,
  globalToken: '',
  uploadBoolean:false,
  userInfo:localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{},


});

const mutations = { 
  SET_userInfo(state,value){
    state.userInfo = value
  },
  SET_globalFocusFlag(state, value) {
    state.globalFocusFlag = value;
  },
  SET_ifreamShow(state,value){
    state.ifreamShow = value
  },
  SET_globalToken(state, value) {
    state.globalToken = value
  },
  DEL_globalToken(state) {
    state.globalToken = ''
  },
  SET_uploadBoolean(state,value){
    state.uploadBoolean =value
  },
 
};
const actions = {
  setUserInfo(content,value){
    content.commit('SET_userInfo',value)
  },

  setglobaltoken(content, value) {
    content.commit('SET_globalToken', value);
  },
  delglobaltoken(content) {
    content.commit('DEL_globalToken');
  },
  setifreamshow(content,value){
    content.commit("SET_ifreamShow",value)
  },
  setUploadBoolean(content,value){
    content.commit('SET_uploadBoolean',value)
  },
 
}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
